﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Shop.Service;
using Shop.Domain;
using System.Collections.Generic;
using Web.core;

namespace Web
{
    public partial class _Default : PageBase
    {
        public IUserInfoSrv _userInfo;
        public IUserInfoSrv g_UserInfoBo
        {
            get { return _userInfo; }
            set { this._userInfo = value; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
           
           
        }

        protected void ok_btn_ServerClick(object sender, EventArgs e)
        {
            string name = t_user.Value;
            string pwd = t_pwd.Value;
            UserInfo user = g_UserInfoBo.GetUserInfoDo(name);
            if (user != null)
            {
                if (user.Userpwd.Equals(pwd))
                {
                    Response.Write("<script>alert('登陆成功！');</script>");
                }
                else
                {
                    Response.Write("<script>alert('登陆失败！');</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('登陆失败！');</script>");
            }
        }
    }
}
